home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / ODFDev / ODF / Found / ODUtils / StorUtil.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-17  |  3.0 KB  |  119 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        StorUtil.h
  3.  
  4.     Contains:    Utilities for Storage.
  5.  
  6.     Owned by:    Vincent Lo
  7.  
  8.     Copyright:    © 1994 - 1996 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.          <3>     5/24/96    jpa        1.1MRD: Use pragma internal to eliminate
  13.                                     NOPs.
  14.          <2>     3/15/96    CC        1316917: Changed
  15.                                     RemoveDataInterchangeProperties parameter
  16.                                     name to "keepProxyProperties".
  17.  
  18.     To Do:
  19. */
  20.  
  21. #ifndef _STORUTIL_
  22. #define _STORUTIL_
  23.  
  24. #ifndef SOM_ODDraft_xh
  25. #include <Draft.xh>
  26. #endif
  27.  
  28. #ifndef _ODTYPES_
  29. #include <ODTypes.h>
  30. #endif
  31.  
  32. #ifndef _ODMEMORY_
  33. #include <ODMemory.h>
  34. #endif
  35.  
  36. #ifndef _PLFMFILE_
  37. #include <PlfmFile.h>
  38. #endif
  39.  
  40. #ifndef SOM_ODPart_xh
  41. #include <Part.xh>
  42. #endif
  43.  
  44. class ODContainer;
  45. class ODSession;
  46. class ODStorageUnitView;
  47. class ODStorageUnit;
  48.  
  49. #ifdef _OD_IMPL_SHARE_UTILS_
  50. #pragma import on
  51. #elif defined(PRAGMA_INTERNAL_SUPPORTED)
  52. #pragma internal on
  53. #endif
  54.  
  55.  
  56. extern "C" {
  57.     void        ODSUAddPropValue(Environment* ev,
  58.                                     ODStorageUnit* su,
  59.                                     ODPropertyName prop,
  60.                                     ODValueType val);
  61.     void        ODSUForceFocus(Environment* ev, 
  62.                                 ODStorageUnit* su,
  63.                                 ODPropertyName prop,
  64.                                 ODValueType val);
  65.     ODBoolean    ODSUExistsThenFocus(Environment* ev, 
  66.                                 ODStorageUnit* su,
  67.                                 ODPropertyName prop,
  68.                                 ODValueType val);
  69.     void        ODSURemoveProperty(Environment* ev,
  70.                                 ODStorageUnit* su,
  71.                                 ODPropertyName prop);
  72.     
  73.     PlatformFile*    GetPlatformFileFromContainer(Environment* ev, ODContainer* container);
  74.     ODFileSpec        GetODFileSpecFromContainer(Environment* ev, ODContainer* container);
  75.  
  76.     ODContainer*    CreateFileContainer(Environment* ev, ODSession* session, FSSpec* fsSpec);
  77.     ODContainer*    GetFileContainer(Environment* ev, ODSession* session, FSSpec* fsSpec);
  78.  
  79.     ODContainer*    CreateMemoryContainer(Environment* ev,
  80.                         ODSession* session,
  81.                         ODHandle handle,
  82.                         ODContainerType containerType);
  83.     ODContainer*    GetMemoryContainer(Environment* ev, 
  84.                         ODSession* session,
  85.                         ODHandle handle,
  86.                         ODContainerType containerType);
  87.  
  88.     ODULong            StorageUnitGetValue(ODStorageUnit* su, Environment* ev,
  89.                                         ODULong size, void *buffer);
  90.     ODULong            StorageUnitViewGetValue(ODStorageUnitView* suv, Environment* ev,
  91.                                         ODULong size, void *buffer);
  92.  
  93.     void            StorageUnitSetValue(ODStorageUnit* su, Environment* ev,
  94.                                         ODULong size, const void *buffer);
  95.     void            StorageUnitViewSetValue(ODStorageUnitView* suv, Environment* ev,
  96.                                         ODULong size, const void *buffer);
  97.     void            StorageUnitSetPromiseValue(ODStorageUnit* su, Environment* ev,
  98.                                         ODValueType value, ODULong offset,
  99.                                         ODULong size, const void *buffer, ODPart *sourcePart);
  100.  
  101.     ODBoolean        StorageUnitGetStylFromStyledText(ODStorageUnit* su,
  102.                         Environment* ev,
  103.                         ODULong* size,
  104.                         ODPtr* styl);
  105.                         
  106.     ODCloneKind GetOriginalCloneKind(Environment* ev, ODDraft* draft);
  107.  
  108.     void RemoveDataInterchangeProperties (Environment* ev,
  109.                         ODStorageUnit* su,
  110.                         ODBoolean keepProxyProperties);
  111. }
  112.  
  113. #ifdef _OD_IMPL_SHARE_UTILS_
  114. #pragma import off
  115. #elif defined(PRAGMA_INTERNAL_SUPPORTED)
  116. #pragma internal reset
  117. #endif
  118.     
  119. #endif // _STORUTIL_